﻿<%@ Page Title="Phân quyền | VNT Việt Nam" Language="C#" MasterPageFile="~/Admin.master"
    AutoEventWireup="true" CodeFile="PhanQuyen.aspx.cs" Inherits="PhanQuyen" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .padding
        {
            margin-left: 10px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="up1" runat="server">
        <ContentTemplate>
            <div class="panel panel-success margin">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Phân quyền nhóm người dùng
                    </h3>
                </div>
                <div class="panel-body">
                    Chọn nhóm người dùng
                    <asp:DropDownList CssClass="form-control" Style="line-height: 30px; width: 200px;"
                        DataTextField="TenNhom" DataValueField="IDs" ID="dlNhomND" Width="100%" runat="server"
                        AutoPostBack="true" OnSelectedIndexChanged="dlNhomND_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ValidationGroup="Them" ID="RequiredFieldValidator111"
                        runat="server" ControlToValidate="dlNhomND" ErrorMessage="Chọn nhóm người dùng" Display="None"
                        Text="*"></asp:RequiredFieldValidator>
                    <asp:Button ID="btnSave" runat="server" Style="margin-left: 5px; width: 100px; margin-bottom: 5px;"
                        Text="Lưu lại" ValidationGroup="Them" CssClass="btn btn-primary" OnClick="btnSave_Click" />
                    <asp:CheckBox ID="ckCheckAll" runat="server" AutoPostBack="true" Text="Chọn/bỏ tất cả"
                        OnCheckedChanged="ckCheckAll_CheckedChanged" />
                    <br />
                    <asp:GridView ID="gvChucNang" AutoGenerateColumns="false" Width="100%" runat="server"
                        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                        CellPadding="3">
                        <Columns>
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbID" runat="server" Text='<%#Eval("IDs") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Chức năng">
                                <ItemTemplate>
                                    <asp:Label ID="lbChucNang" CssClass="padding" runat="server" Text='<%#Eval("TenChucNang") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Sử dụng" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckSuDung" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Thêm" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckThem" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Sửa" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckSua" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Xóa" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckXoa" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Phê duyệt" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckPheDuyet" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Print" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckIn" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbTag" runat="server" Text='<%#Eval("Tag") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle ForeColor="#000066" Height="30px" Font-Names="Time New Roman" Font-Size="Medium" />
                        <FooterStyle BackColor="White" ForeColor="#000066" />
                        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#DFF0D8" Font-Bold="True" ForeColor="#3C763D" Height="30px" />
                    </asp:GridView>
                </div>
            </div>
            <asp:ValidationSummary ID="ValidationSummary1" HeaderText="Bạn phải nhập các trường sau:"
                        ShowMessageBox="true" ValidationGroup="Them" ShowSummary="false" EnableClientScript="true"
                        runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
